projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12e8a92
)
macos: handle NULL surface when creating GL context
author
Christian Hergert
<chergert@redhat.com>
Wed, 29 Sep 2021 00:36:23 +0000
(17:36 -0700)
committer
Christian Hergert
<chergert@redhat.com>
Wed, 29 Sep 2021 00:36:23 +0000
(17:36 -0700)
Fixes #4279
gdk/macos/gdkmacosglcontext.c
patch
|
blob
|
history
diff --git
a/gdk/macos/gdkmacosglcontext.c
b/gdk/macos/gdkmacosglcontext.c
index 09da35b69a617a48dc835b8899a914c11ea189bf..77391b9eaac7827d180e23137eeddcc32aabe0e9 100644
(file)
--- a/
gdk/macos/gdkmacosglcontext.c
+++ b/
gdk/macos/gdkmacosglcontext.c
@@
-226,8
+226,8
@@
gdk_macos_gl_context_real_realize (GdkGLContext *context,
swapRect[0] = 0;
swapRect[1] = 0;
- swapRect[2] = surface
->width
;
- swapRect[3] = surface
->height
;
+ swapRect[2] = surface
? surface->width : 0
;
+ swapRect[3] = surface
? surface->height : 0
;
CGLSetParameter (cgl_context, kCGLCPSwapRectangle, swapRect);
CGLSetParameter (cgl_context, kCGLCPSwapInterval, &sync_to_framerate);